#include "interrupts.h"
#include "pic.h"
#include "asm.h"
#include "stdio.h"
#include "timer.h"
#include "mm.h"
#include "kernel.h"
#include "dev.h"
#include "fd.h"
#include "kbd.h"
#include "kheap.h"
   
char* str = "       Hello World!\n\n\n\0";
int i;
u8* input;
pde_t *map;
pde_t *map2;
pde_t *map3;
pde_t *map4;
u32* a, b, c, d, e, f;

void kmain() {
  monitor_clear(); 
  kprintf("%s\n\n", str);
  cli();
  init_GDT();
  init_pic(0x20, 0x28);
  init_interrupts();
  init_timer(50); 
  init_kbd();
  init_mm();
  init_proc();
  sti();

  print_heap();

  i = fork();
  fork();
  fork();


  // schedule();

  while(1) {
    kprintf("%d", get_pid());
    schedule();
  }
}

// our beloved panic function! prints a message then freezes the machine
void kpanic(char* msg) {
  cli();
  kprintf(msg);
  while(1);
}

